A virtual machine (‘VM’) is a software construct or the like operating on a computing device or the like (i.e., a ‘host’) for the purpose of providing an emulated machine or system. Typically, although not necessarily, the VM is an application or the like, and may be employed on the host to instantiate a use application or the like while at the same time isolating such use application from such host device or from other applications on such host. In one typical situation, the host can accommodate a plurality of deployed VMs, each VM performing some predetermined function by way of resources available from the host.
Notably, each VM as hosted on a computing device is for all intents and purposes a computing machine, although in virtual form, and thus represents itself as such both to the use application thereof and to the outside world. As an example, the VM and/or a use application thereof can and in fact do issue hardware requests for hardware resources of the VM, even though the VM might not in reality have such hardware resources. Instead, and as may be appreciated, such hardware requests are intercepted or otherwise redirected toward the host, and such host services such hardware requests based on the hardware resources thereof, typically with the requesting VM and/or use application thereof being none the wiser.
Typically, although not necessarily, a host deploys each VM thereof in a separate partition, address space, processing area, and/or the like. Such host may include a virtualization layer with a virtual machine monitor (‘VMM’) or the like that acts as an overseer application or ‘hypervisor’, where the virtualization layer oversees and/or otherwise manages supervisory aspects of each VM of the host, and acts as a possible link between each VM and the outside world. The VMM may be a separate application running in its own address space or may be integrated more closely with the host operating system, either directly or as an operating system extension of some sort, such as a device driver. Notably, the VMM of the host may intercept or otherwise redirect hardware requests that originate from each VM of the host and/or a use application thereof, and may at least assist in servicing the requests, again with the requesting VM and/or use application thereof being none the wiser.
Many computing systems comprise multiple processors. Processors in a multiprocessor virtual machine environment may operate in a guest mode or in a VMM mode. When running in a guest mode, a processor uses virtual machine definitions to manage the virtual machine's guest operating system and applications, translating arguments and managing system resources without intervention from the VMM. From time to time, the guest operating system or applications may need system resources that must be managed by the VMM. As examples, the VMM may be required for error handling, system faults, or interrupt handling. In these situations, the processor operates in a VMM mode.
Overall performance of a computer system may depend heavily on the efficiency of the memory hierarchy. The memory system performance is dependent not only on data caches, but also on address caches. A translation lookaside buffer (TLB) is a cache that is used to speed up address translation in a paged virtual memory system. The cache is implemented on-chip to reduce memory access delay.
A TLB is a virtual cache which retrieves a physical address indexed by a virtual address. Without a TLB, every instruction or data reference would require additional memory accesses to the page table. The paging information is stored in a page table entry (PTE) resident in main memory, and its copy is cached into a TLB entry. Inconsistency between a PTE and TLB entry might occur in uniprocessors when an application invokes a virtual memory operation updating a PTE, e.g., a virtual memory operation issued by a user application for memory allocation, deallocation, attribute modification, etc. A uniprocessor maintains consistency by invalidating or flushing the TLB after updating a PTE, since the uniprocessor knows when inconsistency occurs and only a local TLB is involved.
In a shared memory multiprocessor (SMP) environment, multiple threads can be associated with a single application. These threads run independently on different processors, but they all have to share the same address space. Since these threads share the common set of page tables, the same page table entry can be cached into multiple TLBs. If any of the threads updates such a replicated PTE, it causes an inconsistent state between the updated PTE and the TLBs. The problem caused by such inconsistent state is referred to as the TLB consistency problem. TLB consistency is also a concern in a multiprocessor virtual machine computing environment.